package com.zengzhi.mydesignmode.garnishermode.garnishermodedemo;


import com.zengzhi.mydesignmode.garnishermode.garnishermodedemo.abstracted.Beverage;
import com.zengzhi.mydesignmode.garnishermode.garnishermodedemo.coffee.DarkRoast;
import com.zengzhi.mydesignmode.garnishermode.garnishermodedemo.coffee.Decaf;
import com.zengzhi.mydesignmode.garnishermode.garnishermodedemo.condiment.Mocha;
import com.zengzhi.mydesignmode.garnishermode.garnishermodedemo.condiment.Soy;

/**
 * @author xiejiawei
 * @Date 2021-05-09
 * @Time 12:52
 */
public class StarbuzzCoffee {
    public static void main(String[] args) {

        // 第一种饮料类型 不加入任何调料
        Beverage beverage = new Decaf();
        System.out.println(beverage.getDescription() + "$" + beverage.cost());

        // 第二种饮料类型
        Beverage beverage2 = new DarkRoast();
        // 加入调料
        beverage2 = new Mocha(beverage2);
        beverage2 = new Soy(beverage2);
        beverage2.setSize(Beverage.Size.TALL);
        System.out.println(beverage2.getDescription() + "$" + beverage2.cost());



    }

}
